home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_04
/
allison
/
usecmplx.cpp
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1995-02-06
|
259 b
|
17 lines
LISTING 11 - Uses the complex number data type
#include <iostream.h>
#include "complex.h"
main()
{
complex c1(1,2), c2(3,4);
cout << c1 << " + " << c2 << " == " << c1+c2 << endl;
return 0;
}
// Output:
(1,2) + (3,4) == (4,6)